package xps.and.uudaijia.userclient.view.activity;


import android.os.Handler;

import com.jude.utils.JUtils;

import xps.and.uudaijia.userclient.R;
import xps.and.uudaijia.userclient.util.CommonUtils;
import xps.and.uudaijia.userclient.view.MainActivity;
import xps.and.uudaijia.userclient.view.base.BaseActivity;

/**
 * Created by XPS on 2017/7/19.
 */

public class SlashActivity extends BaseActivity {

    @Override
    protected int getLayout() {
        return R.layout.splashscreen;
    }

    @Override
    protected void setData() {

    }

    @Override
    protected void init() {
        new Handler().postDelayed(new Runnable() {
            public void run() {
                boolean login = JUtils.getSharedPreference().getBoolean("User_Login", false);
                if (login) {
                    CommonUtils.AppStartActivity(SlashActivity.this, MainActivity.class);
                    finish();
                } else {
                    CommonUtils.AppStartActivity(SlashActivity.this, LoginActivity.class);
                    finish();
                }

            }
        }, 2900);
    }
}
